<template>
  <div>
    <div v-for="o in CommentList" :key="o">评论内容{{ o.text }}
        评论时间 ：{{o.createTime}}
    </div>
  </div>
</template>


<script>
import { ListCommetById } from "@/api/getCommentData.js";
export default {
  data() {
    return {
      CommentList: [
        {
          text: "评论··",
          createdTime: "2020/1/1",
        },
        { text: "assasa", createdTime: "2020/1/1" },
        { text: "sssss", createdTime: "2020/1/1" },
      ],
    };
  },
  methods: {

      async listComment(){
      const result = await ListCommetById(this.$route.query.TopicId);
      console.log(result.data.data);
      this. CommentList = result.data.data;



      }
  },
  created() {
      this.listComment()
  },
};
</script>

<style>
.el-collapse-item__header {
  font-size: 50px;
  font-family: fantasy;
}
.el-button el-button--mini {
  background-color: aqua;
}
</style>